package com.hzw.dao;

import com.hzw.bean.ArticleCategory;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ArticleCategoryMapper extends Mapper<ArticleCategory> {
    /**
     * 通过Id软删除文章分类
     * @param categoryId
     * @return
     */
    int deleteArticleCategoryById(String categoryId);

    /**
     * 判断type是否存在
     * @param type
     * @return
     */
    int checkExistType(int type);

    /**
     * 通过Id查找博客分类
     * @param categoryId
     * @return
     */
    ArticleCategory selectArticleCategoryById(String categoryId);


    /**
     * 查找所有的博客分类
     * @return
     */
    List<ArticleCategory> selectAllArticleCategory();

    List<ArticleCategory> selectArticleCategoryByArticleId(String articleId);
}